/**
 * @returns 返回路由 /# 后的参数
 */
export function getHashData(): any {
  const hash = window.location.hash.substring(1) // 获取哈希值，去掉'#'
  const params: any = {}
  if (hash.length > 0) {
    const vars = hash.split('&')
    for (let i = 0; i < vars.length; i++) {
      const pair = vars[i].split('=')
      if (typeof pair[1] !== 'undefined') {
        params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1])
      }
    }
  }
  return params
}